package com.ctshk.rpc.user.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @description
 * @author 李新科
 * @date 2021/4/22
 */
@Data
@ApiModel
public class AppUserDTO implements Serializable {

    private static final long serialVersionUID = -4911662568485174533L;

    @ApiModelProperty(name = "id", value = "id")
    private Long id;

    @ApiModelProperty(value="联系人手机区号id")
    private Long contactMobileAreaCodeId;

    @ApiModelProperty(value="联系人手机区号")
    private String contactMobileAreaCode;

    @ApiModelProperty(value="联络电话")
    private String contactNumber;

    @ApiModelProperty(value="用户账号")
    private String userAccount;

    @JsonIgnore
    @ApiModelProperty(value="密码")
    private String password;

    @ApiModelProperty(value="是否星赏会会员")
    private Integer isInternalMember;

    @ApiModelProperty(value="是否接收消息推送")
    private Integer receiveOrNot;

    @ApiModelProperty(value="英文姓")
    private String enSurname;

    @ApiModelProperty(value="英文名")
    private String enName;

    @ApiModelProperty(value="英文全名")
    private String enFullname;

    @ApiModelProperty(value="称谓")
    private Integer appellation;

    @ApiModelProperty(value="出生日期")
    @JsonDeserialize(using = LocalDateDeserializer.class)
    @JsonSerialize(using = LocalDateSerializer.class)
    private LocalDate birthday;

    @ApiModelProperty(value="电邮")
    private String email;

    @ApiModelProperty(value="星赏会会员编号")
    private String memberId;

    @ApiModelProperty(value="会员编码")
    private String memberCode;

    @ApiModelProperty(value="会员等级")
    private Integer memberLevel;

    @ApiModelProperty(value="升级积分（还需要多少积分升级）")
    private Integer upgradePoints;

    @ApiModelProperty(value="消费次数（还需消费多少次升级）")
    private Integer consumptionTimes;

    @ApiModelProperty(value="会员生效日期")
    @JsonDeserialize(using = LocalDateDeserializer.class)
    @JsonSerialize(using = LocalDateSerializer.class)
    private LocalDate memberDate;

    @ApiModelProperty(value="token")
    private String token;

    @ApiModelProperty(value="收藏个数")
    @Deprecated
    private Integer collectionNum = 0;

    @ApiModelProperty(value="足迹个数")
    @Deprecated
    private Integer footPointNum = 0;

    @ApiModelProperty(value="信息个数")
    @Deprecated
    private Integer messageNum = 0;

    @ApiModelProperty(value="我的积分")
    @Deprecated
    private Integer integral = 0;

    @ApiModelProperty(value="注册日期时间")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime gmtCreate;

    @ApiModelProperty(value="会员积分")
    private Integer memberPoints;

}
